package com.edu.publisher.service.impl;

import com.edu.publisher.bean.*;
import com.edu.publisher.mapper.TrafficStatsMapper;
import com.edu.publisher.service.TrafficStatsService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @ClassName: TrafficStatsServiceImpl
 * @Author: wqz
 * @Data: 2022/10/21 0:06
 * @Description:
 */
@Service
public class TrafficStatsServiceImpl implements TrafficStatsService {

    @Autowired
    private TrafficStatsMapper trafficStatsMapper;
    @Override
    public List<TrafficUvCt> getChUvCt(Integer date, Integer limit) {
        return trafficStatsMapper.selectChUvCt(date,limit);
    }

    @Override
    public List<TrafficSvCt> getChSvCt(Integer date, Integer limit) {
        return trafficStatsMapper.selectChSvCt(date, limit);
    }

    @Override
    public List<TrafficPvPerSession> getChPvPerCt(Integer date, Integer limit) {
        return trafficStatsMapper.selectChPvPerSession(date, limit);
    }

    @Override
    public List<TrafficDurPerSession> getChDurPerSession(Integer date, Integer limit) {
        return trafficStatsMapper.selectChDurPerSession(date, limit);
    }

    @Override
    public List<TrafficUjRate> getChUjRate(Integer date, Integer limit) {
        return trafficStatsMapper.selectChUjTate(date, limit);
    }

    @Override
    public List<TrafficVisitorStatsPerHour> getVisitorPerHr(Integer date) {
        return trafficStatsMapper.selectVisitorStatsPerHr(date);
    }
}
